package edu.gdin.ecommerce.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.springframework.context.annotation.Lazy;

/**
 * DicDetail entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "t_dic_detail", catalog = "ecommerce")
public class DicDetail implements java.io.Serializable {

	// Fields

	/**
	 * 
	 */
	private static final long serialVersionUID = 4179368951156527406L;
	private Integer dicDetailId;
	private DicType dicType;
	private String value;
	private String name;

	// Constructors

	/** default constructor */
	public DicDetail() {
	}

	/*
	 * Modified By COF
	 * 2012-04-08
	 */
	/** full constructor */
	public DicDetail(/*String dicTypeId, */String value, String name) {
//		this.dicTypeId = dicTypeId;
		this.value = value;
		this.name = name;
	}

	// Property accessors
	@Id
	@GeneratedValue
	@Column(name = "DIC_DETAIL_ID", unique = true, nullable = false)
	public Integer getDicDetailId() {
		return this.dicDetailId;
	}

	public void setDicDetailId(Integer dicDetailId) {
		this.dicDetailId = dicDetailId;
	}


	@Column(name = "VALUE", nullable = false, length = 50)
	public String getValue() {
		return this.value;
	}

	public void setValue(String value) {
		this.value = value;
	}

	@Column(name = "NAME", nullable = false, length = 100)
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@ManyToOne
	@JoinColumn(name="DIC_TYPE_ID")
	public DicType getDicType() {
		return dicType;
	}

	public void setDicType(DicType dicType) {
		this.dicType = dicType;
	}
	
	

}